
const fs = require('fs');
const path = require('path')
const {failedLog} = require('./log')
module.exports =  function (name){

const dir = path.resolve(process.cwd(), name);

// check if directory exists
if (fs.existsSync(dir)) {
    failedLog(`创建的目录 ${name} 在当前目录下已经存在，请删除后再次创建！`)
    process.exit(1);
}
    return Promise.resolve()
}